<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Result Tab</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: white;
            margin: 0;
            padding: 0;
        }
        .container {
            display: flex;
            flex-direction: column;
            padding: 10px;
        }
        .drawing-grid {
            display: grid;
            grid-gap: 20px;
            padding: 10px;
            background-color: white;
            overflow: auto;
        }
        .logo-pane {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 10px;
            background-color: white;
        }
        .result-content {
            display: flex;
            padding: 10px;
            background-color: white;
        }
        .scroll-pane {
            overflow: auto;
            flex-grow: 1;
            background-color: white;
        }
        .drawing-pane {
            border: 1px solid black;
            background-color: white;
        }
        img {
            width: 40px;
            height: 200px;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="result-content">
        <div class="logo-pane">
            <img src="rose.png" alt="Logo">
        </div>
        <div class="scroll-pane">
            <div id="drawingGrid" class="drawing-grid"></div>
        </div>
    </div>
</div>

<script>
    class ResultTabController {
        constructor() {
            this.drawingGrid = document.getElementById('drawingGrid');
        }

        clearDrawingGridPane() {
            this.drawingGrid.innerHTML = '';
        }

        addDrawingPane(drawingPane, column, row) {
            drawingPane.classList.add('drawing-pane');
            this.drawingGrid.appendChild(drawingPane);
        }
    }

    // Пример использования
    const resultTabController = new ResultTabController();

    // Пример добавления рисунков
    const drawingPane1 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
    drawingPane1.setAttribute("width", "300");
    drawingPane1.setAttribute("height", "200");
    resultTabController.addDrawingPane(drawingPane1, 0, 0);

    const drawingPane2 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
    drawingPane2.setAttribute("width", "300");
    drawingPane2.setAttribute("height", "200");
    resultTabController.addDrawingPane(drawingPane2, 1, 0);

    // Функции для рисования треугольников и векторов
    // Вызывайте функцию drawTriangleAndVector с нужными параметрами
    drawTriangleAndVector(drawingPane1, 150, 100, 150, [100, 50], "10", 111.8, 30, 0.5, true);
    drawTriangleAndVector(drawingPane2, 150, 100, 150, [50, 25], "15", 55.9, 45, 0.5, false);
</script>
</body>
</html>
